package com.jsz.peini.service.user;

import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.jsz.peini.bean.user.UserImage;
import com.jsz.peini.mapper.user.UserImageMapper;

@Service
public class UserImageService {
	
	@Resource
	private UserImageMapper userImageMapper;
	
	public List<HashMap<String,Object>> selectByUserId(String userId){
		List<HashMap<String,Object>> userImageList = userImageMapper.selectByUserId(userId);
		return userImageList;
	}
	
	public int insertUserImageById(UserImage userImage){
		int userImageNum=userImageMapper.insertUserImageById(userImage);
		return userImageNum;
	}
	
	public UserImage selectUserImageByUserId(int id){
		UserImage userImage=userImageMapper.selectUserImageByUserId(id);
		return userImage;
	}
	
	public int deleteUserImageByUserId(int id){
		int userImageDelete=userImageMapper.deleteUserImageByUserId(id);
		return userImageDelete;
	}
	
	public List<LinkedHashMap<String,Object>> selectUserImageAllByUserId(String userId){
		List<LinkedHashMap<String,Object>> userImageAll=userImageMapper.selectUserImageAllByUserId(userId);
		return userImageAll;
	}
	
	public List<LinkedHashMap<String,Object>> selectUserImageTypeByUserId(String userId){
		List<LinkedHashMap<String,Object>> userImageType=userImageMapper.selectUserImageTypeByUserId(userId);
		return userImageType;
	}
	
	
	
}
